﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.Data;
#if !DOT_NET
using Windows.Foundation.Metadata;

#endif

namespace StyleMVVM.Validation
{
	public interface IValidationContext
	{
		IValidationStandardsSelector StandardsSelector { get; }

		object ValidationObject { get; }

		ValidationState State { get; }

		bool Validating { get; }

		IEnumerable<IValidationRuleResultPart> PropertyResults(string propertyName);

		IEnumerable<IValidationRuleResult> RuleResults();

		IEnumerable<IValidationContext> Children { get; }

		IValidationContext ParentContext { get; }

		void LinkContex(IValidationContext context);

		void UnlinkContex(IValidationContext context);

		[DefaultOverload]
		void AddRules(params IValidationRule[] validationRules);

		void AddRules(IEnumerable<IValidationRule> validationRules);

		[DefaultOverload]
		void RemoveRules(params IValidationRule[] validationRules);

		void RemoveRules(IEnumerable<IValidationRule> validationRules);

		void Validate();

		void RegisterIValidatingChangedHandler(IValidatingChangedHandler handler);

		void UnregisterIValidatingChangedHandler(IValidatingChangedHandler handler);

		void RegisterValidationStateChangedHandler(IValidationStateChangedHandler handler);

		void UnregisterValidationStateChangedHandler(IValidationStateChangedHandler handler);

		void RegisterPropertyValidationHandler(string propertyName, IPropertyValidationHandler handler);

		void UnregisterPropertyValidationHandler(string propertyName, IPropertyValidationHandler handler);
	}
}